<template>
    <div>
        <h2 class="school"> 学校名称:{{name}}</h2>
        <h2 ref='address'> 学校地址:{{address}}</h2>
        <button @click="handleRefs('张三')">点我</button>
        <hr>
    </div>
</template>

<script>
export default {
    data() {
        return {
            name:"洛阳职业技术学院",
            address:"洛阳"
        };
    },
    mounted() {
        
    },
    props:['age'],
    created() {
        // this.handleRefs()
    },
    methods: {
        handleRefs (name){
            console.log(this.$refs.address);
            console.log(this.address);
            console.log(this.age);
            console.log(name);
        }
    },
};
</script>

<style lang="less" scoped>
    .school{
    color: red;
}
</style>